@extends('admin.common.base-master')

@section('html-head')
    {{--<link href="{{url('/vendor/tyupload/control/css/zyUpload.css')}}" type="text/css" rel="stylesheet" />--}}
    {{--<link href="{{url('css/jquery.form.css')}}" type="text/css" rel="stylesheet" />--}}
    {{--<script src="{{url('/vendor/My97DatePicker/WdatePicker.js')}}"></script>--}}
    {{--<script src="{{url('/js/lib/jquery.form.js')}}"></script>--}}
@endsection

@section('html-body')
    <div id="content">
        <div id="cur-position">
            <span class="tit">订单管理</span>
            <a href="{{route('Admin.Home.ordersList')}}">订单列表</a>
            <em>&gt;</em>
            <a href="#">订单信息详情</a>
        </div>
        <!-- cur-position end -->

        <div class="gg-step2">

            <div class="list-wrap">
                <h2 class="head">
                    <span class="span1">订单信息详情</span>
                </h2>
                <!-- list-text-box start -->
                <div class="list-text-box">
                    <div class="list-text">
                        <label class="tit">用户昵称：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->nickname}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">用户头像：</label>
                        <div class="cont">
                            <img src="@if($thisOrder){{$thisOrder->photo_url}} @endif" alt="" width="40px">
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">订单编号：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->order_num}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">最终金额：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->s_amount}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">最终原金额：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->m_amount}} @endif</p>
                        </div>
                    </div>

                    @if($thisOrder && $thisOrder->type == 'group')
                        <div class="list-text">
                            <label class="tit">拼团类型：</label>
                            <div class="cont">
                                <p class="text">
                                    @if($thisOrder && $thisOrder->group_type == 1)
                                        单独购买
                                    @elseif($thisOrder && $thisOrder->group_type == 2)
                                        发起拼团
                                    @elseif($thisOrder && $thisOrder->group_type == 3)
                                        参加拼团
                                    @endif
                                </p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">拼团是否退款：</label>
                            <div class="cont">
                                <p class="text">
                                    @if($thisOrder && $thisOrder->group_refund == 0)
                                        未退款
                                    @elseif($thisOrder && $thisOrder->group_refund == 1)
                                        已退款
                                    @elseif($thisOrder && $thisOrder->group_refund == 2)
                                        退款失败
                                    @endif
                                </p>
                            </div>
                        </div>
                    @endif

                    <div class="list-text">
                        <label class="tit">是否支付：</label>
                        <div class="cont">
                            <p class="text">
                                @if($thisOrder && $thisOrder->is_pay == 0)
                                    未支付
                                @elseif($thisOrder && $thisOrder->is_pay == 1)
                                    已支付
                                @endif
                            </p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">支付时间：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->pay_time}} @endif</p>
                        </div>
                    </div>
                    <div class="list-text">
                        <label class="tit">支付方式：</label>
                        <div class="cont">
                            <p class="text">
                                @if($thisOrder && $thisOrder->pay_type == 'wechat')
                                    微信
                                @else
                                    未知
                                @endif
                            </p>

                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">快递公司：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->express_name}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">快递单号：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->express_num}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">快递费用：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->express_fee}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">发货时间：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->express_time}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">配送地址：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->address}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">备注：</label>
                        <div class="cont">
                            <p class="text">@if($thisOrder){{$thisOrder->remark}} @endif</p>
                        </div>
                    </div>

                    <div class="list-text">
                        <label class="tit">订单状态：</label>
                        <div class="cont">
                            <p class="text">
                            @if($thisOrder && $thisOrder->status == 0)
                                <span  style="color:red;">未完成</span>
                            @elseif($thisOrder && $thisOrder->status == 1)
                                <span style="color:red;">待付款</span>
                            @elseif($thisOrder && $thisOrder->status == 2)
                                <span style="color:red;">待发货</span>
                            @elseif($thisOrder && $thisOrder->status == 3)
                                <span style="color:red;">待收货</span>
                            @elseif($thisOrder && $thisOrder->status == 4)
                                <span style="color:red;">待评价</span>
                            @elseif($thisOrder && $thisOrder->status == 5)
                                <span style="color:green;">完成</span>
                            @elseif($thisOrder && $thisOrder->status == 6)
                                <span style="color:orange;">取消订单</span>
                            @elseif($thisOrder && $thisOrder->status == 8)
                                <span style="color:red;">拼团中</span>
                            @endif
                            </p>
                        </div>
                    </div>
                    <!-- list-text-box end -->
                </div>
            </div>
        </div>

        <div class="list-wrap">
            <h2 class="head">
                <span class="span1">子订单订单信息</span>
            </h2>
            <!-- list-text-box start -->
            @if(count($orderItems) > 0)
                @foreach($orderItems as $orderItem)
                    <div class="list-text-box">
                        <div class="list-text">
                            <label class="tit">子订单编号：</label>
                            <div class="cont">
                                <p class="text">@if($orderItem){{$orderItem->item_num}} @endif</p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">商品名称：</label>
                            <div class="cont">
                                <p class="text">@if($orderItem){{$orderItem->goods_name}} @endif</p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">商品打折后单价：</label>
                            <div class="cont">
                                <p class="text">@if($orderItem){{$orderItem->s_price}} @endif</p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">商品原单价：</label>
                            <div class="cont">
                                <p class="text">@if($orderItem){{$orderItem->m_price}} @endif</p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">商品总量：</label>
                            <div class="cont">
                                <p class="text">@if($orderItem){{$orderItem->num}} @endif</p>
                            </div>
                        </div>

                        <div class="list-text">
                            <label class="tit">商品类型：</label>
                            <div class="cont">
                                <p class="text">
                                    @if($orderItem){{$orderItem->classify_name}} @endif
                                </p>
                            </div>
                        </div>
                        <!-- list-text-box end -->
                    </div>
                    <hr/>
                @endforeach
            @endif
        </div>
    </div>
@endsection